<?php

function checkPassword($password) {

	$bool = True;

    if (strlen($password) < 8) {
        echo "Password must be at least 8 characters in length.<br>";
		$bool = False;
    }

    if (!preg_match("#[0-9]+#", $password)) {
        echo "Password must include at least one number.<br>";
		$bool = False;
    }

    if (!preg_match("#[a-zA-Z]+#", $password)) {
        echo "Password must include at least one letter.<br>";
		$bool = False;
    }
	
	return $bool;
}

function checkEmail($email) {
	return filter_var($email, FILTER_VALIDATE_EMAIL);
}

?>